<!DOCTYPE html>
<html>
<head>
    <title>设备维修详情</title>
    #parse("sys/header.html")
</head>
<body>
    <div id="rrapp" v-cloak>
        <Card>
            <Tabs value="name0" type="card">
                <Tab-pane label="基础信息" name="name0">
                    <Card>
                        <i-form ref="formValidate" :model="devMaintenRepair" :label-width="80">
                            <Row>
                                <i-col span="11">
                                    <Form-item label="报修序号">
                                        <span>  {{devMaintenRepair.orderNo}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="11">
                                    <Form-item label="设备名称">
                                        <span> {{devMaintenRepair.devName}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row>
                                <i-col span="11">
                                    <Form-item label="故障代码">
                                        <span>  {{devMaintenRepair.faultCode}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="11">
                                    <Form-item label="故障类型">
                                        <span> {{devMaintenRepair.type}}</span>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row>
                                <i-col span="11">
                                    <Form-item label="故障时长（分钟）">
                                        <span>  {{devMaintenRepair.faultNum}}</span>
                                    </Form-item>
                                </i-col>
                                <i-col span="11">
                                    <Form-item label="确认时间">
                                        <Date-picker type="datetime" format="yyyy-MM-dd HH:mm" v-model="devMaintenRepair.sureDate" class="from_tab_wide"></Date-picker>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row>
                                <i-col span="11">
                                    <Form-item label="维修开始">
                                        <span>  {{devMaintenRepair.faultNum}}</span>
                                        <Date-picker type="datetime" v-model="devMaintenRepair.repairStartDate"
                                                     class="from_tab_wide"></Date-picker>
                                    </Form-item>
                                </i-col>
                                <i-col span="11">
                                    <Form-item label="维修结束">
                                        <Date-picker type="datetime" v-model="devMaintenRepair.repairEndDate" placeholder="维修结束时间"
                                                     class="from_tab_wide"></Date-picker>
                                    </Form-item>
                                </i-col>
                            </Row>
                            <Row>
                                <Form-item label="故障描述" prop="recordDescr">
                                    <i-input type="textarea" v-model="devMaintenRepair.recordDescr" placeholder="故障描述"></i-input>
                                </Form-item>
                            </Row>
                            <Row>
                                <Form-item label="故障原因" prop="reason">
                                    <i-input type="textarea" v-model="devMaintenRepair.reason" placeholder="原因"></i-input>
                                </Form-item>
                            </Row>
                            <Row>
                                <Form-item label="解决办法" prop="solution">
                                    <i-input type="textarea" v-model="devMaintenRepair.solution" placeholder="解决办法"></i-input>
                                </Form-item>
                            </Row>
                            <Row>
                                <Form-item label="备注信息" prop="remark">
                                    <i-input type="textarea" v-model="devMaintenRepair.remark" placeholder="备注信息"></i-input>
                                </Form-item>
                            </Row>
                        </i-form>
                    </Card>
                </Tab-pane>
            </Tabs>
        </Card>
    </div>
</body>
<script>
    var repairId = getQueryString("repairId");
    var vm = new Vue({
        el: '#rrapp',
        data: {
            devMaintenRepair: {
                devId: '',
                devName: '',
                repairInKnow: '',
                remark: '',
                solution: '',
                reason: '',
                recordDescr: '',
                type: '',
                orderNo: '',
                maintenRecordCode: '',
                maintenRecordId: '',
                id: '',
                delFlag: '',
                faultNum: '',
                sureDate: '',
                sureUser: '',
                repairEndDate: '',
                repairStartDate: '',
                repairUser: '',
                faultCode: '',
            },
        },
        methods:{
            getInfo: function (id) {
                Ajax.request({
                    url: "../devmaintenrepair/info/" + id,
                    async: true,
                    successCallback: function (r) {
                        vm.devMaintenRepair = r.devMaintenRepair;
                    }
                });
            },
        }

    });

    $(function () {
        vm.getInfo(repairId);
    });
</script>
</html>